package peer.share;

public class RePubTimmer implements Runnable{
	Thread mainThread;
	long startTime=System.currentTimeMillis();
	public RePubTimmer(){
		mainThread=new Thread(this);
		mainThread.start();
	}
	
	public void run(){
		while(true){
			try {
				Thread.sleep(1000*60*60*12);
			} catch (InterruptedException e) {
				continue;
			}
			if(peer.Config.isLive){
				peer.Config.shareFileMange.pubAllFile_ReRegAssist();
				peer.Config.cacheFileMange.pubAllCache_ReRegAssist();
			}
		}
	}
	
	public void reStart(){
		startTime=System.currentTimeMillis();
		mainThread.interrupt();
	}

}
